﻿@{
    Layout = null;
}
@using Wicresoft.UnifyShow.Business
@model AnnouncementModel
@{
    var canEdit = (bool)ViewData["canEdit"];
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>公告详情</title>
    <link href="@Url.Content("~/Content/css/global.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/main.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/plan.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/themes/default/easyui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/themes/icon.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.8.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.easyui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/site.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/plan.js")" type="text/javascript"></script>
</head>
<body>
    <div class="outer_border" id="bulletinDetail" style="padding: 5px 0; margin: 5px 0;border:none;">
        @if (!canEdit)
        {
            <div class="news_title">
                @(Model != null ? Model.Title : "")
            </div>
            <div class="news_date">发布日期：<span>@(Model != null ? Model.BeginTime.ToString("yyyy-MM-dd") : "")</span></div>
            <div class="news_content">@(Model != null ? Model.Content : "")</div>
        }
        else
        {
        
            <input type="hidden" data-source="ID" value="" />
            <div class="parameter">
                <div class="parameter_name"><span class="required">*</span>开始时间：</div>
                <div class="parameter_input">
                    <input type="text" id="bulletinStartDate" class="easyui-datebox startDate" data-source="BeginTime" data-required-info="请选择开始时间！" value="@(Model != null ? Model.BeginTime.ToString("yyyy-MM-dd") : "")" />
                </div>
            </div>
            <div class="parameter">
                <div class="parameter_name"><span class="required">*</span>失效时间：</div>
                <div class="parameter_input">
                    <input type="text" id="bulletinEndDate" class="easyui-datebox endDate" data-source="EndTime" data-required-info="请选择失效时间！" value="@(Model != null ? Model.EndTime.ToString("yyyy-MM-dd") : "")" />
                </div>
            </div>
            <div class="parameter one_line">
                <div class="parameter_name"><span class="required">*</span>标题：</div>
                <div class="parameter_input" style="width: 660px;">
                    <input type="text" id="bulletinTitle" data-source="Title" data-required-info="请填写公告标题！" value="@(Model != null ? Model.Title : "")" />
                </div>
            </div>
            <div class="parameter one_line">
                <div class="parameter_name"><span class="required">*</span>内容：</div>
                <div class="parameter_input" style="width: 660px;">
                    <textarea rows="5" id="bulletinContent" data-source="Content" data-required-info="请填写公告内容！">@(Model != null ? Model.Content : "")</textarea>
                </div>
            </div>
            <div id="updateButton">
                <input type="button" value="修改" onclick="update()" />
                <input type="button" value="取消" onclick="cancel()" />
            </div>
        
        }
    </div>
    @*@if (!canEdit)
    {
        <script type="text/javascript">
            $(function () {
                $('input,textarea').attr('disabled', true);
                $('.easyui-datebox').datebox({ 'disabled': true });
                $('.validatebox-text').attr('disabled', true);
            });
        </script>
    }*@
</body>
</html>
